
#include "Tools\Size.h"


Size::Size()
	: m_width(0),
	  m_height(0)
{
}


Size::Size(INT width, INT height)
	: m_width(width),
	  m_height(height)
{
}


Size::~Size()
{
}


Size::Size(CONST Size& other)
	: m_width(other.m_width),
	  m_height(other.m_height)
{
}


Size& Size::operator = (const Size& other)
{
	// Self-assignement.
	if(this == &other)
		return *this;

	// Copy.
	m_width = other.m_width;
	m_height = other.m_height;

	return *this;
}


BOOL Size::IsNull() CONST
{
	return m_width == 0.0f || m_height == 0.0f;
}


INT Size::GetWidth() const
{
	return m_width;
}


INT Size::GetHeight() const
{
	return m_height;
}


VOID Size::SetWidth(INT width)
{
	m_width = width;
}


VOID Size::SetHeight(INT height)
{
	m_height = height;
}